package com.pactera.madp.cp.api.feign;

import com.pactera.madp.common.core.constant.SecurityConstants;
import com.pactera.madp.common.core.constant.ServiceNameConstants;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.api.dto.sync.SyncDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteSyncService", value = ServiceNameConstants.CP_SERVICE)
public interface RemoteSyncService {

    @PostMapping("/sync/data")
    R<Boolean> sync(@RequestBody SyncDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

}
